BIN = https_dump
OBJS = main.o http.o util_debug.o
CFLAGS = -Wall -Os -s
CFLAGS += -D DEBUG
INCLUDES = -I. -I./include

GDB = NO
ifeq ($(GDB), YES)
	CFLAGS += -g
endif

LIBS = -lssl -lcrypto -lm -lz -lpthread

.PHONY: all


all: $(BIN)

$(BIN): $(OBJS)
	$(CC) $(CFLAGS) $(OBJS) -o $@ $(LIBS)

%.o: %.c
	$(CC) -c $< -o $@ $(CFLAGS) $(INCLUDES)

clean:
	rm -rf $(BIN) $(OBJS)
